home *** CD-ROM | disk | FTP | other *** search
/ FM Towns: Free Software Collection 10 / FM Towns Free Software Collection 10.iso / ms_dos / tool / fapxtool / src / txm / txmswchk.c < prev   
C/C++ Source or Header  |  1995-01-06  |  796b  |  44 lines

  1. /***************
  2. *
  3. * txm\txmswchk.c
  4. */
  5. #include "txm.h"
  6.  
  7. /* オプションチェック */
  8. void swchk(int count, char **val)
  9. {
  10.     int i;
  11.  
  12. /*    printf("swchk()\n");    */
  13.     for (i = 0; val[i] != NULL; i++) {
  14.         if (val[i][0] == '-') {
  15.             val[i][1] = tolower(val[i][1]);
  16.             switch(val[i][1]) {
  17.             case '@':
  18.                 strcpy(txmdir, &(val[i][2]));
  19.                 break;
  20.             case 'a':
  21.                 nextmerge = 1;
  22.                 nextvalue = atoi(&(val[i][2]));
  23.                 break;
  24.             case 'l':
  25.                 strcpy(logfile, &(val[i][2]));
  26.                 break;
  27.             case 'm':
  28.                 nextmerge = 2;
  29.                 nextvalue = 0;
  30.                 break;
  31.             case 'r':
  32.                 minrun = atoi(&(val[i][2]));
  33.                 maxrun = atoi(strchr(&(val[i][2]), '-')+1);
  34.                 break;
  35.             case 's':
  36.                 nextmerge = 0;
  37.                 nextvalue = atoi(&(val[i][2]));
  38.                 nextvalue *= 1024;
  39.                 break;
  40.             }
  41.         }
  42.     }
  43. }
  44.